OpenHMD
Loading...
Searching...
No Matches
openhmd.h File Reference

Go to the source code of this file.

Macros

#define OHMD_APIENTRY
 
#define OHMD_APIENTRYDLL   __attribute__((visibility("default")))
 
#define OHMD_STR_SIZE   256
 

Typedefs

typedef struct ohmd_context ohmd_context
 
typedef struct ohmd_device ohmd_device
 
typedef struct ohmd_device_settings ohmd_device_settings
 

Enumerations

enum  ohmd_status {
  OHMD_S_OK = 0 ,
  OHMD_S_UNKNOWN_ERROR = -1 ,
  OHMD_S_INVALID_PARAMETER = -2 ,
  OHMD_S_UNSUPPORTED = -3 ,
  OHMD_S_INVALID_OPERATION = -4 ,
  OHMD_S_USER_RESERVED = -16384
}
 
enum  ohmd_string_value {
  OHMD_VENDOR = 0 ,
  OHMD_PRODUCT = 1 ,
  OHMD_PATH = 2
}
 
enum  ohmd_string_description {
  OHMD_GLSL_DISTORTION_VERT_SRC = 0 ,
  OHMD_GLSL_DISTORTION_FRAG_SRC = 1 ,
  OHMD_GLSL_330_DISTORTION_VERT_SRC = 2 ,
  OHMD_GLSL_330_DISTORTION_FRAG_SRC = 3 ,
  OHMD_GLSL_ES_DISTORTION_VERT_SRC = 4 ,
  OHMD_GLSL_ES_DISTORTION_FRAG_SRC = 5
}
 
enum  ohmd_control_hint {
  OHMD_GENERIC = 0 ,
  OHMD_TRIGGER = 1 ,
  OHMD_TRIGGER_CLICK = 2 ,
  OHMD_SQUEEZE = 3 ,
  OHMD_MENU = 4 ,
  OHMD_HOME = 5 ,
  OHMD_ANALOG_X = 6 ,
  OHMD_ANALOG_Y = 7 ,
  OHMD_ANALOG_PRESS = 8 ,
  OHMD_BUTTON_A = 9 ,
  OHMD_BUTTON_B = 10 ,
  OHMD_BUTTON_X = 11 ,
  OHMD_BUTTON_Y = 12 ,
  OHMD_VOLUME_PLUS = 13 ,
  OHMD_VOLUME_MINUS = 14 ,
  OHMD_MIC_MUTE = 15
}
 
enum  ohmd_control_type {
  OHMD_DIGITAL = 0 ,
  OHMD_ANALOG = 1
}
 
enum  ohmd_float_value {
  OHMD_ROTATION_QUAT = 1 ,
  OHMD_LEFT_EYE_GL_MODELVIEW_MATRIX = 2 ,
  OHMD_RIGHT_EYE_GL_MODELVIEW_MATRIX = 3 ,
  OHMD_LEFT_EYE_GL_PROJECTION_MATRIX = 4 ,
  OHMD_RIGHT_EYE_GL_PROJECTION_MATRIX = 5 ,
  OHMD_POSITION_VECTOR = 6 ,
  OHMD_SCREEN_HORIZONTAL_SIZE = 7 ,
  OHMD_SCREEN_VERTICAL_SIZE = 8 ,
  OHMD_LENS_HORIZONTAL_SEPARATION = 9 ,
  OHMD_LENS_VERTICAL_POSITION = 10 ,
  OHMD_LEFT_EYE_FOV = 11 ,
  OHMD_LEFT_EYE_ASPECT_RATIO = 12 ,
  OHMD_RIGHT_EYE_FOV = 13 ,
  OHMD_RIGHT_EYE_ASPECT_RATIO = 14 ,
  OHMD_EYE_IPD = 15 ,
  OHMD_PROJECTION_ZFAR = 16 ,
  OHMD_PROJECTION_ZNEAR = 17 ,
  OHMD_DISTORTION_K = 18 ,
  OHMD_EXTERNAL_SENSOR_FUSION = 19 ,
  OHMD_UNIVERSAL_DISTORTION_K = 20 ,
  OHMD_UNIVERSAL_ABERRATION_K = 21 ,
  OHMD_CONTROLS_STATE = 22
}
 
enum  ohmd_int_value {
  OHMD_SCREEN_HORIZONTAL_RESOLUTION = 0 ,
  OHMD_SCREEN_VERTICAL_RESOLUTION = 1 ,
  OHMD_DEVICE_CLASS = 2 ,
  OHMD_DEVICE_FLAGS = 3 ,
  OHMD_CONTROL_COUNT = 4 ,
  OHMD_CONTROLS_HINTS = 5 ,
  OHMD_CONTROLS_TYPES = 6
}
 
enum  ohmd_data_value {
  OHMD_DRIVER_DATA = 0 ,
  OHMD_DRIVER_PROPERTIES = 1
}
 
enum  ohmd_int_settings { OHMD_IDS_AUTOMATIC_UPDATE = 0 }
 
enum  ohmd_device_class {
  OHMD_DEVICE_CLASS_HMD = 0 ,
  OHMD_DEVICE_CLASS_CONTROLLER = 1 ,
  OHMD_DEVICE_CLASS_GENERIC_TRACKER = 2
}
 
enum  ohmd_device_flags {
  OHMD_DEVICE_FLAGS_NULL_DEVICE = 1 ,
  OHMD_DEVICE_FLAGS_POSITIONAL_TRACKING = 2 ,
  OHMD_DEVICE_FLAGS_ROTATIONAL_TRACKING = 4 ,
  OHMD_DEVICE_FLAGS_LEFT_CONTROLLER = 8 ,
  OHMD_DEVICE_FLAGS_RIGHT_CONTROLLER = 16
}
 

Functions

OHMD_APIENTRYDLL ohmd_context *OHMD_APIENTRY ohmd_ctx_create (void)
 
OHMD_APIENTRYDLL void OHMD_APIENTRY ohmd_ctx_destroy (ohmd_context *ctx)
 
OHMD_APIENTRYDLL const char *OHMD_APIENTRY ohmd_ctx_get_error (ohmd_context *ctx)
 
OHMD_APIENTRYDLL void OHMD_APIENTRY ohmd_ctx_update (ohmd_context *ctx)
 
OHMD_APIENTRYDLL int OHMD_APIENTRY ohmd_ctx_probe (ohmd_context *ctx)
 
OHMD_APIENTRYDLL int ohmd_gets (ohmd_string_description type, const char **out)
 
OHMD_APIENTRYDLL const char *OHMD_APIENTRY ohmd_list_gets (ohmd_context *ctx, int index, ohmd_string_value type)
 
OHMD_APIENTRYDLL int OHMD_APIENTRY ohmd_list_geti (ohmd_context *ctx, int index, ohmd_int_value type, int *out)
 
OHMD_APIENTRYDLL ohmd_device *OHMD_APIENTRY ohmd_list_open_device (ohmd_context *ctx, int index)
 
OHMD_APIENTRYDLL ohmd_device *OHMD_APIENTRY ohmd_list_open_device_s (ohmd_context *ctx, int index, ohmd_device_settings *settings)
 
OHMD_APIENTRYDLL ohmd_status OHMD_APIENTRY ohmd_device_settings_seti (ohmd_device_settings *settings, ohmd_int_settings key, const int *val)
 
OHMD_APIENTRYDLL ohmd_device_settings *OHMD_APIENTRY ohmd_device_settings_create (ohmd_context *ctx)
 
OHMD_APIENTRYDLL void OHMD_APIENTRY ohmd_device_settings_destroy (ohmd_device_settings *settings)
 
OHMD_APIENTRYDLL int OHMD_APIENTRY ohmd_close_device (ohmd_device *device)
 
OHMD_APIENTRYDLL int OHMD_APIENTRY ohmd_device_getf (ohmd_device *device, ohmd_float_value type, float *out)
 
OHMD_APIENTRYDLL int OHMD_APIENTRY ohmd_device_setf (ohmd_device *device, ohmd_float_value type, const float *in)
 
OHMD_APIENTRYDLL int OHMD_APIENTRY ohmd_device_geti (ohmd_device *device, ohmd_int_value type, int *out)
 
OHMD_APIENTRYDLL int OHMD_APIENTRY ohmd_device_seti (ohmd_device *device, ohmd_int_value type, const int *in)
 
OHMD_APIENTRYDLL int OHMD_APIENTRY ohmd_device_set_data (ohmd_device *device, ohmd_data_value type, const void *in)
 
OHMD_APIENTRYDLL void OHMD_APIENTRY ohmd_get_version (int *out_major, int *out_minor, int *out_patch)
 
OHMD_APIENTRYDLL ohmd_status OHMD_APIENTRY ohmd_require_version (int major, int minor, int patch)
 
OHMD_APIENTRYDLL void OHMD_APIENTRY ohmd_sleep (double time)
 

Detailed Description

Main header for OpenHMD public API.

Macro Definition Documentation

◆ OHMD_STR_SIZE

#define OHMD_STR_SIZE   256

Maximum length of a string, including termination, in OpenHMD.

Typedef Documentation

◆ ohmd_context

typedef struct ohmd_context ohmd_context

An opaque pointer to a context structure.

◆ ohmd_device

typedef struct ohmd_device ohmd_device

An opaque pointer to a structure representing a device, such as an HMD.

◆ ohmd_device_settings

An opaque pointer to a structure representing arguments for a device.

Enumeration Type Documentation

◆ ohmd_control_hint

Standard controls. Note that this is not an index into the control state. Use OHMD_CONTROL_TYPES to determine what function a control serves at a given index.

◆ ohmd_control_type

Control type. Indicates whether controls are digital or analog.

◆ ohmd_data_value

A collection of data information types used for setting information with ohmd_set_data().

Enumerator
OHMD_DRIVER_DATA 

void* (set): Set void* data for use in the internal drivers.

OHMD_DRIVER_PROPERTIES 

ohmd_device_properties* (set): Set the device properties based on the ohmd_device_properties struct for use in the internal drivers.

This can be used to fill in information about the device internally, such as Android, or for setting profiles.

◆ ohmd_device_class

Device classes.

Enumerator
OHMD_DEVICE_CLASS_HMD 

HMD device.

OHMD_DEVICE_CLASS_CONTROLLER 

Controller device.

OHMD_DEVICE_CLASS_GENERIC_TRACKER 

Generic tracker device.

◆ ohmd_device_flags

Device flags.

Enumerator
OHMD_DEVICE_FLAGS_NULL_DEVICE 

Device is a null (dummy) device.

◆ ohmd_float_value

A collection of float value information types, used for getting and setting information with ohmd_device_getf() and ohmd_device_setf().

Enumerator
OHMD_ROTATION_QUAT 

float[4] (get): Absolute rotation of the device, in space, as a quaternion (x, y, z, w).

OHMD_LEFT_EYE_GL_MODELVIEW_MATRIX 

float[16] (get): A "ready to use" OpenGL style 4x4 matrix with a modelview matrix for the left eye of the HMD.

OHMD_RIGHT_EYE_GL_MODELVIEW_MATRIX 

float[16] (get): A "ready to use" OpenGL style 4x4 matrix with a modelview matrix for the right eye of the HMD.

OHMD_LEFT_EYE_GL_PROJECTION_MATRIX 

float[16] (get): A "ready to use" OpenGL style 4x4 matrix with a projection matrix for the left eye of the HMD.

OHMD_RIGHT_EYE_GL_PROJECTION_MATRIX 

float[16] (get): A "ready to use" OpenGL style 4x4 matrix with a projection matrix for the right eye of the HMD.

OHMD_POSITION_VECTOR 

float[3] (get): A 3-D vector representing the absolute position of the device, in space.

OHMD_SCREEN_HORIZONTAL_SIZE 

float[1] (get): Physical width of the device screen in metres.

OHMD_SCREEN_VERTICAL_SIZE 

float[1] (get): Physical height of the device screen in metres.

OHMD_LENS_HORIZONTAL_SEPARATION 

float[1] (get): Physical separation of the device lenses in metres.

OHMD_LENS_VERTICAL_POSITION 

float[1] (get): Physical vertical position of the lenses in metres.

OHMD_LEFT_EYE_FOV 

float[1] (get): Physical field of view for the left eye in degrees.

OHMD_LEFT_EYE_ASPECT_RATIO 

float[1] (get): Physical display aspect ratio for the left eye screen.

OHMD_RIGHT_EYE_FOV 

float[1] (get): Physical field of view for the left right in degrees.

OHMD_RIGHT_EYE_ASPECT_RATIO 

float[1] (get): Physical display aspect ratio for the right eye screen.

OHMD_EYE_IPD 

float[1] (get, set): Physical interpupillary distance of the user in metres.

OHMD_PROJECTION_ZFAR 

float[1] (get, set): Z-far value for the projection matrix calculations (i.e. drawing distance).

OHMD_PROJECTION_ZNEAR 

float[1] (get, set): Z-near value for the projection matrix calculations (i.e. close clipping distance).

OHMD_DISTORTION_K 

float[6] (get): Device specific distortion value.

OHMD_EXTERNAL_SENSOR_FUSION 

float[10] (set): Perform sensor fusion on values from external sensors.

Values are: dt (time since last update in seconds) X, Y, Z gyro, X, Y, Z accelerometer and X, Y, Z magnetometer.

OHMD_UNIVERSAL_DISTORTION_K 

float[4] (get): Universal shader distortion coefficients (PanoTools model <a,b,c,d>.

OHMD_UNIVERSAL_ABERRATION_K 

float[3] (get): Universal shader aberration coefficients (post warp scaling <r,g,b>.

OHMD_CONTROLS_STATE 

float[OHMD_CONTROL_COUNT] (get): Get the state of the device's controls.

◆ ohmd_int_settings

Enumerator
OHMD_IDS_AUTOMATIC_UPDATE 

int[1] (set, default: 1): Set this to 0 to prevent OpenHMD from creating background threads to do automatic device ticking. Call ohmd_update(); must be called frequently, at least 10 times per second, if the background threads are disabled.

◆ ohmd_int_value

A collection of int value information types used for getting information with ohmd_device_geti().

Enumerator
OHMD_SCREEN_HORIZONTAL_RESOLUTION 

int[1] (get, ohmd_geti()): Physical horizontal resolution of the device screen.

OHMD_SCREEN_VERTICAL_RESOLUTION 

int[1] (get, ohmd_geti()): Physical vertical resolution of the device screen.

OHMD_DEVICE_CLASS 

int[1] (get, ohmd_geti()/ohmd_list_geti()): Gets the class of the device. See: ohmd_device_class.

OHMD_DEVICE_FLAGS 

int[1] (get, ohmd_geti()/ohmd_list_geti()): Gets the flags of the device. See: ohmd_device_flags.

OHMD_CONTROL_COUNT 

int[1] (get, ohmd_geti()): Get the number of analog and digital controls of the device.

OHMD_CONTROLS_HINTS 

int[OHMD_CONTROL_COUNT] (get, ohmd_geti()): Get what function controls serve.

OHMD_CONTROLS_TYPES 

int[OHMD_CONTROL_COUNT] (get, ohmd_geti()): Get whether controls are digital or analog.

◆ ohmd_status

Return status codes, used for all functions that can return an error.

Enumerator
OHMD_S_USER_RESERVED 

OHMD_S_USER_RESERVED and below can be used for user purposes, such as errors within ohmd wrappers, etc.

◆ ohmd_string_description

A collection of string descriptions, used for getting strings with ohmd_gets().

◆ ohmd_string_value

A collection of string value information types, used for getting information with ohmd_list_gets().

Function Documentation

◆ ohmd_close_device()

OHMD_APIENTRYDLL int OHMD_APIENTRY ohmd_close_device ( ohmd_device * device)

Close a device.

Closes a device opened by ohmd_list_open_device. Note that ohmd_ctx_destroy automatically closes any open devices associated with the context being destroyed.

Parameters
deviceThe open device.
Returns
0 on success, <0 on failure.

◆ ohmd_ctx_create()

OHMD_APIENTRYDLL ohmd_context *OHMD_APIENTRY ohmd_ctx_create ( void )

Create an OpenHMD context.

Returns
a pointer to an allocated ohmd_context on success or NULL if it fails.

◆ ohmd_ctx_destroy()

OHMD_APIENTRYDLL void OHMD_APIENTRY ohmd_ctx_destroy ( ohmd_context * ctx)

Destroy an OpenHMD context.

ohmd_ctx_destroy de-initializes and de-allocates an OpenHMD context allocated with ohmd_ctx_create. All devices associated with the context are automatically closed.

Parameters
ctxThe context to destroy.

◆ ohmd_ctx_get_error()

OHMD_APIENTRYDLL const char *OHMD_APIENTRY ohmd_ctx_get_error ( ohmd_context * ctx)

Get the last error as a human readable string.

If a function taking a context as an argument (ohmd_context "methods") returns non-successfully, a human readable error message describing what went wrong can be retrieved with this function.

Parameters
ctxThe context to retrieve the error message from.
Returns
a pointer to the error message.

◆ ohmd_ctx_probe()

OHMD_APIENTRYDLL int OHMD_APIENTRY ohmd_ctx_probe ( ohmd_context * ctx)

Probe for devices.

Probes for and enumerates supported devices attached to the system.

Parameters
ctxA context with no currently open devices.
Returns
the number of devices found on the system.

◆ ohmd_ctx_update()

OHMD_APIENTRYDLL void OHMD_APIENTRY ohmd_ctx_update ( ohmd_context * ctx)

Update a context.

Update the values for the devices handled by a context.

If background threads are disabled, this performs tasks like pumping events from the device. The exact details are up to the driver but try to call it quite frequently. Once per frame in a "game loop" should be sufficient. If OpenHMD is handled in a background thread in your program, calling ohmd_ctx_update and then sleeping for 10-20 ms is recommended.

Parameters
ctxThe context that needs updating.

◆ ohmd_device_getf()

OHMD_APIENTRYDLL int OHMD_APIENTRY ohmd_device_getf ( ohmd_device * device,
ohmd_float_value type,
float * out )

Get a floating point value from a device.

Parameters
deviceAn open device to retrieve the value from.
typeWhat type of value to retrieve, see ohmd_float_value section for more information.
[out]outA pointer to a float, or float array where the retrieved value should be written.
Returns
0 on success, <0 on failure.

◆ ohmd_device_geti()

OHMD_APIENTRYDLL int OHMD_APIENTRY ohmd_device_geti ( ohmd_device * device,
ohmd_int_value type,
int * out )

Get an integer value from a device.

Parameters
deviceAn open device to retrieve the value from.
typeWhat type of value to retrieve, ohmd_int_value section for more information.
[out]outA pointer to an integer, or integer array where the retrieved value should be written.
Returns
0 on success, <0 on failure.

◆ ohmd_device_set_data()

OHMD_APIENTRYDLL int OHMD_APIENTRY ohmd_device_set_data ( ohmd_device * device,
ohmd_data_value type,
const void * in )

Set an void* data value for a device.

Parameters
deviceAn open device to set the value in.
typeWhat type of value to set, see ohmd_float_value section for more information.
inA pointer to the void* casted object.
Returns
0 on success, <0 on failure.

◆ ohmd_device_setf()

OHMD_APIENTRYDLL int OHMD_APIENTRY ohmd_device_setf ( ohmd_device * device,
ohmd_float_value type,
const float * in )

Set a floating point value for a device.

Parameters
deviceAn open device to set the value in.
typeWhat type of value to set, see ohmd_float_value section for more information.
inA pointer to a float, or float array where the new value is stored.
Returns
0 on success, <0 on failure.

◆ ohmd_device_seti()

OHMD_APIENTRYDLL int OHMD_APIENTRY ohmd_device_seti ( ohmd_device * device,
ohmd_int_value type,
const int * in )

Set an integer value for a device.

Parameters
deviceAn open device to set the value in.
typeWhat type of value to set, see ohmd_float_value section for more information.
inA pointer to a int, or int array where the new value is stored.
Returns
0 on success, <0 on failure.

◆ ohmd_device_settings_create()

OHMD_APIENTRYDLL ohmd_device_settings *OHMD_APIENTRY ohmd_device_settings_create ( ohmd_context * ctx)

Create a device settings instance.

Parameters
ctxA pointer to a valid ohmd_context.
Returns
a pointer to an allocated ohmd_context on success or NULL if it fails.

◆ ohmd_device_settings_destroy()

OHMD_APIENTRYDLL void OHMD_APIENTRY ohmd_device_settings_destroy ( ohmd_device_settings * settings)

Destroy a device settings instance.

Parameters
ctxThe device settings instance to destroy.

◆ ohmd_device_settings_seti()

OHMD_APIENTRYDLL ohmd_status OHMD_APIENTRY ohmd_device_settings_seti ( ohmd_device_settings * settings,
ohmd_int_settings key,
const int * val )

Specify int settings in a device settings struct.

Parameters
settingsThe device settings struct to set values to.
keyThe specefic setting you wish to set.
valueA pointer to an int or int array (containing the expected number of elements) with the value(s) you wish to set.

◆ ohmd_get_version()

OHMD_APIENTRYDLL void OHMD_APIENTRY ohmd_get_version ( int * out_major,
int * out_minor,
int * out_patch )

Get the library version.

Parameters
majorMajor version.
minorMinor version.
patchPatch version.

◆ ohmd_gets()

OHMD_APIENTRYDLL int ohmd_gets ( ohmd_string_description type,
const char ** out )

Get string from openhmd.

Gets a string from OpenHMD. This is where non-device specific strings reside. This is where the distortion shader sources can be retrieved.

Parameters
typeThe name of the string to fetch. One of OHMD_GLSL_DISTORTION_FRAG_SRC, and OHMD_GLSL_DISTORTION_FRAG_SRC.
outThe location to return a const char*
Returns
0 on success, <0 on failure.

◆ ohmd_list_geti()

OHMD_APIENTRYDLL int OHMD_APIENTRY ohmd_list_geti ( ohmd_context * ctx,
int index,
ohmd_int_value type,
int * out )

Get integer value from enumeration list index.

ohmd_ctx_probe must be called before calling ohmd_list_gets.

Parameters
ctxA (probed) context.
indexAn index, between 0 and the value returned from ohmd_ctx_probe.
typeWhat type of value to retrieve, ohmd_int_value section for more information.
Returns
0 on success, <0 on failure.

◆ ohmd_list_gets()

OHMD_APIENTRYDLL const char *OHMD_APIENTRY ohmd_list_gets ( ohmd_context * ctx,
int index,
ohmd_string_value type )

Get device description from enumeration list index.

Gets a human readable device description string from a zero indexed enumeration index between 0 and (max - 1), where max is the number ohmd_ctx_probe returned (i.e. if ohmd_ctx_probe returns 3, valid indices are 0, 1 and 2). The function can return three types of data. The vendor name, the product name and a driver specific path where the device is attached.

ohmd_ctx_probe must be called before calling ohmd_list_gets.

Parameters
ctxA (probed) context.
indexAn index, between 0 and the value returned from ohmd_ctx_probe.
typeThe type of data to fetch. One of OHMD_VENDOR, OHMD_PRODUCT and OHMD_PATH.
Returns
a string with a human readable device name.

◆ ohmd_list_open_device()

OHMD_APIENTRYDLL ohmd_device *OHMD_APIENTRY ohmd_list_open_device ( ohmd_context * ctx,
int index )

Open a device.

Opens a device from a zero indexed enumeration index between 0 and (max - 1) where max is the number ohmd_ctx_probe returned (i.e. if ohmd_ctx_probe returns 3, valid indices are 0, 1 and 2).

ohmd_ctx_probe must be called before calling ohmd_list_open_device.

Parameters
ctxA (probed) context.
indexAn index, between 0 and the value returned from ohmd_ctx_probe.
Returns
a pointer to an ohmd_device, which represents a hardware device, such as an HMD.

◆ ohmd_list_open_device_s()

OHMD_APIENTRYDLL ohmd_device *OHMD_APIENTRY ohmd_list_open_device_s ( ohmd_context * ctx,
int index,
ohmd_device_settings * settings )

Open a device with additional settings provided.

Opens a device from a zero indexed enumeration index between 0 and (max - 1) where max is the number ohmd_ctx_probe returned (i.e. if ohmd_ctx_probe returns 3, valid indices are 0, 1 and 2).

ohmd_ctx_probe must be called before calling ohmd_list_open_device.

Parameters
ctxA (probed) context.
indexAn index, between 0 and the value returned from ohmd_ctx_probe.
settingsA pointer to a device settings struct.
Returns
a pointer to an ohmd_device, which represents a hardware device, such as an HMD.

◆ ohmd_require_version()

OHMD_APIENTRYDLL ohmd_status OHMD_APIENTRY ohmd_require_version ( int major,
int minor,
int patch )

Check that the library is compatible with the required version.

Parameters
majorRequired major version.
minorRequired minor version.
patchRequired patch version.
Returns
OMHD_S_OK if the version is compatible or OHMD_S_UNSUPPORTED if it's not.

◆ ohmd_sleep()

OHMD_APIENTRYDLL void OHMD_APIENTRY ohmd_sleep ( double time)

Sleep for the given amount of seconds.

Parameters
timeTime to sleep in seconds.